<?php

namespace app\controller\api;

use think\facade\Db;

class Notoken extends Base
{
    public function getidentity()
    {
        try {
            $uid = input('uid');
            if ($uid) {
                $data = Db::connect('fast_mysql')->table("fa_user")->alias("u")->join("fa_user_info i", "u.id=i.user_id")->join("fa_identity d", "i.identity_id=d.id")
                    ->where(['u.id' => $uid])->field("u.id,u.avatar,i.country,u.username,u.username_ru,u.nickname,d.type")->find();
                if ($data) {
                    $this->api_result(200, '请求成功', ['data' => $data]);
                } else {
                    $this->api_result(200, '请求成功', ['data' => []]);
                }
            } else {
                $this->api_result(200, '请求成功', ['data' => []]);
            }
        } catch (\Exception $e) {
            $this->api_result(200, '请求成功', ['data' => []]);
        }
    }
}